using System;
using System.ComponentModel;
using OpenTK;

namespace Foundry.Engine
{
	/// <summary>
	/// Class used for debugging. Makes objects rotate around a defined axis
	/// </summary>
	public class DollyModifier : Modifier
	{
		public DollyModifier ()
		{
			Axis = Vector3.UnitY;
			RevolusionsPerSecond = 1f;
		}
	
		
		public Vector3 Axis { get; set; }
		
		[DefaultValue(1f)]
		public float RevolusionsPerSecond { get; set; }
		
		public void Step()
		{
			Parent.RelativeRotation = Quaternion.FromAxisAngle(Axis, (float)Math.PI * 2 * RevolusionsPerSecond * Scene.Owner.DeltaTime) * Parent.RelativeRotation;
		}
	}
}

